n0=d_gon { if ($readini %gamefile game type != off) { return 1 } | halt }
n1=d_gc { set %addy ! $+ $remove($address,~) | set %site $mask(%addy,3) | unset %addy | return 1 }
n2=d_ig { set %addy ! $+ $remove($address,~) | set %site $mask(%addy,3) | unset %addy | if ($readini %gamefile sites %site != $null) { return 1 } | else { Notice $nick Sorry, your not in this round... | halt } }
n3=d_is { if ($nick = $readini %gamefile pr $+ %turn nick) { unset %site | return 1 } | else { notice $nick Wait for your turn... | unset %site | halt } }
n4=d_isbj { if ($readini %gamefile game type = Blackjack) { return 1 } | else { halt } }
n5=/bj5 { msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick You have 5 Cards and are ranked at $readini %gamefile pr $+ %turn total | writeini %gamefile pr $+ %turn total fivecard | nextplayer }
n12= msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick ╗ hand is $readini %gamefile pr $+ %turn vhand ranked at $readini %gamefile pr $+ %turn total
n13= if ($readini %gamefile pr $+ %turn total > 21) {
n14= if (%turn = 1) { goto dealer }
n15= msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick, you have busted! | writeini %gamefile pr $+ %turn total Busted | goto nextplayer
n16= }
n17= if ($readini %gamefile pr $+ %turn total = 21) {
n18= if (%turn = 1) { goto dealer }
n19= msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick, you have 21
n20= if (%noc >= 5) { bj5 } | goto nextplayer
n21= }
n22= if ($readini %gamefile pr $+ %turn total <= 20) {
n23= if (%turn = 1) { goto fbj }
n24= if (%noc >= 5) { bj5 | goto nextplayer }
n25= msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick ╗ hitme or stand?
n32=/nextplayer { :next | inc %turn 1 | if (%turn > $readini %gamefile game nop) { fbj } | if ($readini %gamefile pr $+ %turn blackjack != $null) { msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick, I am skipping you, you have Blackjack | goto next } | msg $readini %gamefile game channel $readini %gamefile pr $+ %turn nick your options are hitme, stand, myhand, dealer | halt }
n33=/takebets { writeini %gamefile game players $me | writeini %gamefile game nop 1 | writeini %gamefile pr1 nick Dealer | writeini %gamefile game type BlackJack | writeini %gamefile game channel $chan | notice $chan Blackjack table has just opened, type !join to play | .timer2000 1 30 /set %nojoin 0 | .timer2002 1 30 dbj | .timer2001 1 15 notice $chan You have 15 seconds to !join }
n60=fbj { %turn = 1 | if ($readini %gamefile pr $+ %turn total >= 17) { d_credit } | if ($readini %gamefile pr $+ %turn total <= 16) { hitme } | halt }
n61=ebj {
n62= .timer2000 off | .timer2001 off | writeini %gamefile game players none | writeini %gamefile game nop 0 | writeini %gamefile game takebets no | writeini %gamefile game type off | remini %gamefile sites | notice $readini %gamefile game channel Blackjack table has closed... | writeini %gamefile game channel N/A | %i = 1
n110= msg $readini %gamefile game channel $readini %gamefile pr $+ %i nick ╗ hand is $readini %gamefile pr $+ %i vhand ranked at $readini %gamefile pr $+ %i total
n111= if (%value = 21) { msg $readini %gamefile game channel $readini %gamefile pr $+ %i nick has BlackJack !!! | writeini %gamefile pr $+ %i total Blackjack }